import React from 'react'
import { Icon } from 'antd'
import { Link } from 'dva/router'
import './cms.less'
/**
 * optList 参考 utils/menu.js
 * @param props
 * @returns {XML}
 * @constructor
 */

const NewDataMenu = (props) => {
  const {optList, itemStyle} = props;

  return <ul className="uk_content_menu">
    {
      optList.map(function (item, key) {
        return <li key={key}  style={itemStyle||null}>
          <Link to={item.url||item.key}>
            <Icon type={item.icon}/>{item.text||item.name}
          </Link>
        </li>
      })
    }
  </ul>
};

export default NewDataMenu
